import request from '@/utils/request'
import {
    commercialApiUrl
} from '../config.js'
//商务策划书列表
export function recordList(data) {
    return request({
        url: commercialApiUrl + '/merchant/plan-book/query',
        method: 'post',
        data: data
    })
}
//统计
export function getListCount(data) {
    return request({
        url: commercialApiUrl + '/merchant/plan-book/count',
        method: 'post',
        data: data
    })
}
//商务策划书新增基本信息保存
export function recordRow(data) {
    return request({
        url: commercialApiUrl + '/merchant/plan-book',
        method: 'post',
        data: data
    })
}
//商务策划书列表删除
export function eliminate(params) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/del`,
        method: 'post',
        params
    })
}

//商务策划书列表撤销作废
export function cancel(data) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/cancel`,
        method: 'post',
        data: data
    })
}
//商务策划书基本信息编辑
export function rewrite(data) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/update`,
        method: 'post',
        data: data
    })
}
//商务策划书详细信息回显
export function detailed(id) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/query/${id}`,
        method: 'get',
    })
}
//打印商务策划书
export function print(id) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/print/${id}`,
        method: 'get',

    })
}
//自施合同额数据获取
export function getSinceContractAmount(query) {
    return request({
        url: commercialApiUrl + `/target/autoContractData`,
        method: 'get',
        params: query
    })
}


//新增-商务策划书初始数据
export function queryProjectInfo(id) {
    return request({
        url: commercialApiUrl + `/merchant/plan-book/queryProjectInfo/${id}`,
        method: 'get',
    })
}